<?php

namespace App\Enums\OpenShop\InvestmentPromotion;

class MainProcessEnum
{

    const SUCCESS = 1;
    const FAIL    = 0;

    const MAIN_PROCESS_INVESTMENT_SIGN    = 1;
    const MAIN_PROCESS_SHOP_LOCATION      = 2;
    const MAIN_PROCESS_SPACE_DESIGN       = 3;
    const MAIN_PROCESS_ENGINEER_CONSTRUCT = 4;
    const MAIN_PROCESS_SHOP_CHECK         = 5;
    const MAIN_PROCESS_START_BUSINESS     = 6;

    /**
     * 主流程
     */
    const MAIN_PROCESS_MAP = [
        self::MAIN_PROCESS_INVESTMENT_SIGN    => "商家签约",
        self::MAIN_PROCESS_SHOP_LOCATION      => "开发选址",
        self::MAIN_PROCESS_SPACE_DESIGN       => "空间设计",
        self::MAIN_PROCESS_ENGINEER_CONSTRUCT => "工程营建",
        self::MAIN_PROCESS_SHOP_CHECK         => "门店验收",
        self::MAIN_PROCESS_START_BUSINESS     => "正式开业"
    ];

    const APP_PROCESS_TITLE_SIGN     = '商家签约';
    const APP_PROCESS_TITLE_LOCATION = '开发选址';

    /**
     * 流程树
     */
    const PROCESS_TREE_MAP = [
        self::MAIN_PROCESS_INVESTMENT_SIGN    => self::INVESTMENT_SIGN_MAP,
        self::MAIN_PROCESS_SHOP_LOCATION      => self::SHOP_LOCATION_MAP,
        self::MAIN_PROCESS_SPACE_DESIGN       => self::MAIN_PROCESS_SPACE_DESIGN_MAP,
        self::MAIN_PROCESS_ENGINEER_CONSTRUCT => self::MAIN_PROCESS_ENGINEER_CONSTRUCT_MAP,
        self::MAIN_PROCESS_SHOP_CHECK         => self::MAIN_PROCESS_SHOP_CHECK_MAP,
        self::MAIN_PROCESS_START_BUSINESS     => self::MAIN_PROCESS_START_BUSINESS_MAP
    ];


    const INVESTMENT_SIGN_SUBMIT_SIGN_ORDER = 1;
    const INVESTMENT_SIGN_CONTRACT_PAID     = 2;
    const INVESTMENT_SIGN_CONTRACT_SIGNED   = 3;

    /**
     * 招商签约流程
     */
    const INVESTMENT_SIGN_MAP = [
        self::INVESTMENT_SIGN_SUBMIT_SIGN_ORDER => "招商提交开店订单",
        self::INVESTMENT_SIGN_CONTRACT_PAID     => "商家完成合同支付",
        self::INVESTMENT_SIGN_CONTRACT_SIGNED   => "商家完成合同签署",
    ];


    /**
     * 开发选址确认阶段
     */
    //默认值  开发待指派
    const SHOP_LOCATION_CHOOSE_MANAGER      = 0;
    const SHOP_LOCATION_CHOOSE_MANAGER_NAME = '开发待指派';

    const SHOP_LOCATION_ASSIGN_MANAGER_STAY = 0;
    const SHOP_LOCATION_ASSIGN_MANAGER      = 1;
    const SHOP_LOCATION_FORM_SUBMIT         = 2;
    const SHOP_LOCATION_CONFIRM             = 3;
    const SHOP_LOCATION_MAP                 = [
        self::SHOP_LOCATION_ASSIGN_MANAGER_STAY => "开发待指派",
        self::SHOP_LOCATION_ASSIGN_MANAGER      => "指派开发顾问",
        self::SHOP_LOCATION_FORM_SUBMIT         => "开发选址表单提交",
        self::SHOP_LOCATION_CONFIRM             => "开发选址确认"
    ];

    const ENGINEER_CONSTRUCT_STAY             = 0;
    const ENGINEER_CONSTRUCT_START            = 1;
    const ENGINEER_CONSTRUCT_CONFIRM_FINISH   = 2;
    const MAIN_PROCESS_ENGINEER_CONSTRUCT_MAP = [
        self::ENGINEER_CONSTRUCT_STAY           => "筹备部等待施工进场",
        self::ENGINEER_CONSTRUCT_START          => "筹备部确认施工进场",
        self::ENGINEER_CONSTRUCT_CONFIRM_FINISH => "筹备部确认施工完成"
    ];


    const SHOP_CHECK_ASSIGN_MANAGER_STAY = 0;
    const SHOP_CHECK_ASSIGN_MANAGER      = 1;
    const SHOP_CHECK_BY_MANAGER          = 2;
//    const SHOP_CHECK_BY_PROVINCE_MANAGER = 3;
    const MAIN_PROCESS_SHOP_CHECK_MAP = [
        self::SHOP_CHECK_ASSIGN_MANAGER_STAY => "等待指派营运督导",
        self::SHOP_CHECK_ASSIGN_MANAGER      => "指派营运督导",
        self::SHOP_CHECK_BY_MANAGER          => "督导验收",
//        self::SHOP_CHECK_BY_PROVINCE_MANAGER => "省总验收确认"
    ];

    //流程  0 1 2 4 6 5 7 3 8 9
    const SPACE_DESIGN_STEP_TYPE_PREPARATIONS_CONFIRM            = 0;
    const SPACE_DESIGN_STEP_TYPE_CONFIRM_SHOP_INFO               = 1;
    const SPACE_DESIGN_STEP_TYPE_SPACE_DESIGN_ASSIGN_WAIT        = 2;
    const SPACE_DESIGN_STEP_TYPE_DESIGN_UPLOAD_FILE              = 3;
    const SPACE_DESIGN_STEP_TYPE_DESIGN_CONFIRM_DESIGN_MODULE    = 4;
    const SPACE_DESIGN_STEP_TYPE_DESIGN_CONFIRM_EQUIPMENT_MODULE = 5;
    const SPACE_DESIGN_STEP_TYPE_DESIGN_MODULE_PAY               = 6;
    const SPACE_DESIGN_STEP_TYPE_DESIGN_EQUIPMENT_PAY            = 7;
    const SPACE_DESIGN_STEP_TYPE_SOFT_OUTFIT_PAY                 = 8;
    const SPACE_DESIGN_STEP_TYPE_SPACE_FINISH                    = 9;

    const MAIN_PROCESS_SPACE_DESIGN_MAP = [
        self::SPACE_DESIGN_STEP_TYPE_PREPARATIONS_CONFIRM            => '待筹备确认',
        self::SPACE_DESIGN_STEP_TYPE_CONFIRM_SHOP_INFO               => '筹备部确认建店信息',
        self::SPACE_DESIGN_STEP_TYPE_SPACE_DESIGN_ASSIGN_WAIT        => '指派空间设计师',
        self::SPACE_DESIGN_STEP_TYPE_DESIGN_CONFIRM_DESIGN_MODULE    => '设计师确认设计模块',
        self::SPACE_DESIGN_STEP_TYPE_DESIGN_MODULE_PAY               => '设计模块待支付',
        self::SPACE_DESIGN_STEP_TYPE_DESIGN_CONFIRM_EQUIPMENT_MODULE => '设计师确认设备模块',
        self::SPACE_DESIGN_STEP_TYPE_DESIGN_EQUIPMENT_PAY            => '设备模块待支付',
        self::SPACE_DESIGN_STEP_TYPE_DESIGN_UPLOAD_FILE              => '设计师提交整套图',
        self::SPACE_DESIGN_STEP_TYPE_SOFT_OUTFIT_PAY                 => '软装待支付',
        self::SPACE_DESIGN_STEP_TYPE_SPACE_FINISH                    => '设计模块已完成',
    ];

    /**
     * 获取下一个状态
     */
    const SPACE_DESIGN_STEP_NEXT_STEP = [
        self::SPACE_DESIGN_STEP_TYPE_PREPARATIONS_CONFIRM            => self::SPACE_DESIGN_STEP_TYPE_CONFIRM_SHOP_INFO,
        self::SPACE_DESIGN_STEP_TYPE_CONFIRM_SHOP_INFO               => self::SPACE_DESIGN_STEP_TYPE_SPACE_DESIGN_ASSIGN_WAIT,
        self::SPACE_DESIGN_STEP_TYPE_SPACE_DESIGN_ASSIGN_WAIT        => self::SPACE_DESIGN_STEP_TYPE_DESIGN_CONFIRM_DESIGN_MODULE,
        self::SPACE_DESIGN_STEP_TYPE_DESIGN_CONFIRM_DESIGN_MODULE    => self::SPACE_DESIGN_STEP_TYPE_DESIGN_MODULE_PAY,
        self::SPACE_DESIGN_STEP_TYPE_DESIGN_MODULE_PAY               => self::SPACE_DESIGN_STEP_TYPE_DESIGN_CONFIRM_EQUIPMENT_MODULE,
        self::SPACE_DESIGN_STEP_TYPE_DESIGN_CONFIRM_EQUIPMENT_MODULE => self::SPACE_DESIGN_STEP_TYPE_DESIGN_EQUIPMENT_PAY,
        self::SPACE_DESIGN_STEP_TYPE_DESIGN_EQUIPMENT_PAY            => self::SPACE_DESIGN_STEP_TYPE_DESIGN_UPLOAD_FILE,
        self::SPACE_DESIGN_STEP_TYPE_DESIGN_UPLOAD_FILE              => self::SPACE_DESIGN_STEP_TYPE_SOFT_OUTFIT_PAY,
        self::SPACE_DESIGN_STEP_TYPE_SOFT_OUTFIT_PAY                 => self::SPACE_DESIGN_STEP_TYPE_SPACE_FINISH,
    ];


    const START_BUSINESS_STAY             = 0;
    const START_BUSINESS_SUBMIT           = 1;
    const MAIN_PROCESS_START_BUSINESS_MAP = [
        self::START_BUSINESS_STAY   => "待表单提交",
        self::START_BUSINESS_SUBMIT => "开业表单提交完成"
    ];

    const CHILD_ORDER_0 = 0; // 主订单
    const CHILD_ORDER_1 = 1; // 子订单 ｜ 迁址

    const ORDER_TYPE_0    = 0;
    const ORDER_TYPE_1    = 1;
    const ORDER_TYPE_2    = 2;
    const ORDER_TYPE_TEXT = [
        self::ORDER_TYPE_0 => "默认开店订单",
        self::ORDER_TYPE_1 => "迁址单",
        self::ORDER_TYPE_2 => "开店续签单"
    ];


}
